package com.awakensoftware.hunterserver.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.HttpHeaders;

public abstract class ControllerBase<ErrorResponseType> {

	protected abstract HttpHeaders getResponseHeaders();

	protected HttpHeaders getExceptionResponseHeaders() {
		HttpHeaders responseHeaders = new HttpHeaders();
		responseHeaders.add("Content-Type", "application/json; charset=utf-8");
		return responseHeaders;
	}

	protected abstract ErrorResponseType handleException(Exception ex, HttpServletRequest request);
}
